import request from '@/utils/request'

// 获取新闻详情
export function getArticle(art_id) {
    return request({
        url: `/v1_0/articles/${art_id}`
    })
}

// 关注作者
export function followAuth(data) {
    return request({
        url: '/v1_0/user/followings',
        method: 'POST',
        data
    })
}

// 取消关注
export function unFollowAuth(aut_id) {
    return request({
        url: `/v1_0/user/followings/${aut_id}`,
        method: 'DELETE'
    })
}

// 获取评论或者评论回复
export function getComments(params) {
    return request({
        url: 'v1_0/comments',
        method: 'GET',
        params
    })
}

// 对文章或者评论进行评论
export function setComment(data) {
    return request({
        url: '/v1_0/comments',
        method: 'post',
        data
    })
}